package com.ice.ubt;

import android.app.Application;
import android.content.Context;
import android.content.Intent;

import com.growingio.android.sdk.collection.Configuration;
import com.growingio.android.sdk.collection.GrowingIO;
import com.ice.ubt.service.UploadDataService;

/**
 * Created by sunxin on 2017/6/13.
 */

public class App extends Application {
    private static App instance;
    public static App getInstance() {
        return instance;
    }
    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
       // uploadDataService(this);
        initGrowingIO();
    }
private void initGrowingIO(){
    GrowingIO.startWithConfiguration(this, new Configuration()
            .useID()
            .trackAllFragments()
            .setChannel("suijin")
            .setDebugMode(true)); //打开调试Log;
}
    public   static void uploadDataService(Context context) {
        Intent intent = new Intent(context, UploadDataService.class);
        context.startService(intent);
    }
}
